package com.ruoyi.management_controller.userinfo.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户信息对象 userinfo
 * 
 * @author ruoyi
 * @date 2024-07-12
 */
public class Userinfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    private static final int ROLE_VALUE=1;

    /** 自增长的主键ID */
    private Long id;

    /** 申请的用户名，需唯一 */
    @Excel(name = "申请的用户名，需唯一")
    private String username;

    /** 加密存储的用户密码 */
    @Excel(name = "加密存储的用户密码")
    private String password;

    /** 存储的真实密码 */
    @Excel(name = "存储的真实密码")
    private String rawPassword;

    /** 用户角色，1: 选民, 2: 人大代表, 3: 街工委 */
    @Excel(name = "用户角色，1: 选民, 2: 人大代表, 3: 街工委")
    private Integer role;

    /** 用户姓名 */
    @Excel(name = "用户姓名")
    private String name;

    /** 用户联系信息 */
    @Excel(name = "用户联系信息")
    private String contactInfo;

    /** 上次登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上次登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastLogin;

    /** 父ID，默认为0 */
    @Excel(name = "父ID，默认为0")
    private Long parentId;

    /** 用户注册时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户注册时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 备用的整数字段 */
    @Excel(name = "备用的整数字段")
    private Long spareInt;

    /** 备用的字符串字段 */
    /** 备用的字符串字段 */

    private String spareVarchar;
    @Excel(name = "街道地址")
    private String addr;
    @Excel(name = "用户手机号")
    private String phone;


    private String secPwd;


    public String getSecPwd() {
        return secPwd;
    }

    public void setSecPwd(String secPwd) {
        this.secPwd = secPwd;
    }

    public String getSpareVarchar() {
        return spareVarchar;
    }

    public void setSpareVarchar(String spareVarchar) {
        this.spareVarchar = spareVarchar;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public Long getSpareInt() {
        return spareInt;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setRawPassword(String rawPassword) 
    {
        this.rawPassword = rawPassword;
    }

    public String getRawPassword() 
    {
        return rawPassword;
    }
    public void setRole(Integer role) 
    {
        this.role = role;
    }

    public Integer getRole() 
    {
        return role;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setContactInfo(String contactInfo) 
    {
        this.contactInfo = contactInfo;
    }

    public String getContactInfo() 
    {
        return contactInfo;
    }
    public void setLastLogin(Date lastLogin) 
    {
        this.lastLogin = lastLogin;
    }

    public Date getLastLogin() 
    {
        return lastLogin;
    }
    public void setParentId(Long parentId) 
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setSpareInt(Long spareInt) 
    {
        this.spareInt = spareInt;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("rawPassword", getRawPassword())
            .append("role", getRole())
            .append("name", getName())
            .append("contactInfo", getContactInfo())
            .append("lastLogin", getLastLogin())
            .append("parentId", getParentId())
            .append("createdAt", getCreatedAt())
            .append("spareInt", getSpareInt())
            .append("spareVarchar", getAddr())
            .toString();
    }
}
